package ouhenry.stage.common.base;

public enum ErrorEnum {
    SUCESS(200, "操作成功"), 
    TOKEN_INVALID(401, "token已过期或不正确,请重新登陆"), 
    FAILED(1000, "操作失败"),
    LOGIN_LIMIT(1001, "登陆限制"),
    DUPLICATE(1002, "重复录入"),
    ACCOUNT_SAME(1003, "账户与关联账户不能相同"),
    NO_OPPOSITE(1004, "没有相反类型"),
    OPPOSITE_LIMIT_ONE(1005, "相反类型限制为一级子类型"),
    AMOUNT_LARGE(1006, "金额过大"),
    PARAM_ERROR(1007, "参数错误"),
    ACCOUNT_NOT_EXIST(1008, "账户不存在"),
    ;

    /**
     * 错误类型码
     */
    private Integer code;
    /**
     * 错误类型描述信息
     */
    private String msg;

    ErrorEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
